package com.takeaway.dao.daolmpl;

import com.takeaway.dao.daointerface.ComplaintDao;
import com.takeaway.pojo.Complaint;
import com.takeaway.utils.JdbcUtils;

import java.util.ArrayList;

/**
 * @author 后台赖骏
 */
public class ComplaintDaoImpl implements ComplaintDao {
    @Override
    public int insert(Complaint complaint) throws Exception{
        return JdbcUtils.insert(complaint);
    }

    @Override
    public int delete(Class<Complaint> clz, String[] checkField, Object... factor) throws Exception{
        return JdbcUtils.delete(clz,checkField,factor);
    }

    @Override
    public int update(Complaint complaint) throws Exception{
        return JdbcUtils.update(complaint);
    }

    @Override
    public Complaint selectSingle(Complaint complaint, String[] checkFields, Object... factor) throws Exception{
        return (Complaint) JdbcUtils.selectSingle(complaint,checkFields,factor);
    }

    @Override
    public ArrayList<Complaint> selectMore(Class<Complaint> clz, int begin, int listNum) throws Exception{
        return (ArrayList<Complaint>) JdbcUtils.selectMore(clz,begin,listNum);
    }

    @Override
    public ArrayList<Complaint> selectMore(Class<Complaint> clz, String[] checkField, Object... factor) throws Exception{
        return (ArrayList<Complaint>) JdbcUtils.selectMore(clz,checkField,factor);
    }
}
